﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "IEventArgs.h"

namespace gcmp
{
    /// \brief Undo/Redo事件类型
    ///
    enum UndoRedoEventType : int32_t
    {
        PreUndo,      ///< 即将执行Undo操作
        PostUndo,     ///< 执行完Undo操作
        PreRedo,      ///< 即将执行Redo操作
        PostRedo      ///< 执行完Redo操作
    };

    /// \brief  Undo/Redo事件参数
    ///
    FINAL_INTERFACE class GCMP_MODEL_INTERFACE_EXPORT IUndoRedoEventArgs : public IEventArgs
    {
        DEFINE_CAST_DERIVED(gcmp::IUndoRedoEventArgs, gcmp::IEventArgs);
    public:

        ///  \brief 获取Undo/Redo事件类型
        ///
        /// \return Undo/Redo事件类型
        virtual UndoRedoEventType GetType() const = 0;
    };
}
